# Quick test script to verify path fixes
# This script tests the basic functionality without building images

$ErrorActionPreference = "Stop"

Write-Host "Quick test for Dinghong Cloud Screen deployment..." -ForegroundColor Green

# Test path calculation
$PROJECT_ROOT = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path))
Write-Host "Calculated project root: $PROJECT_ROOT" -ForegroundColor Cyan

# Test server path
$serverPath = Join-Path $PROJECT_ROOT "server"
if (Test-Path $serverPath) {
    Write-Host "✓ Server path is correct: $serverPath" -ForegroundColor Green
    if (Test-Path (Join-Path $serverPath "Dockerfile")) {
        Write-Host "✓ Server Dockerfile exists" -ForegroundColor Green
    }
    else {
        Write-Host "✗ Server Dockerfile missing" -ForegroundColor Red
    }
}
else {
    Write-Host "✗ Server path is incorrect: $serverPath" -ForegroundColor Red
}

# Test web path
$webPath = Join-Path $PROJECT_ROOT "web"
if (Test-Path $webPath) {
    Write-Host "✓ Web path is correct: $webPath" -ForegroundColor Green
    if (Test-Path (Join-Path $webPath "Dockerfile")) {
        Write-Host "✓ Web Dockerfile exists" -ForegroundColor Green
    }
    else {
        Write-Host "✗ Web Dockerfile missing" -ForegroundColor Red
    }
}
else {
    Write-Host "✗ Web path is incorrect: $webPath" -ForegroundColor Red
}

Write-Host "`nQuick test completed!" -ForegroundColor Green 